package ThreadDemo1;

public class test6 {
    public static void main(String[] args) throws InterruptedException {
        Thread t = new Thread(() ->{
            for(int i = 0;i <6;i++){
                System.out.println("Thread");
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }
            }
        });
        t.start();
        t.join();
        System.out.println("this is main");
    }
}
